package com.newshub.app.data.model

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "news")
data class News(
    @PrimaryKey
    val docid: String,
    val title: String,
    val digest: String,
    val source: String,
    val ptime: String,
    val imgsrc: String?,
    val url: String,
    val replyCount: Int = 0,
    val isFavorite: Boolean = false,
    val category: String = "",
    val videoUrl: String? = null,
    val isVideo: Boolean = false
)

data class NewsResponse(
    val T1348647853363: List<News>? = null,  // 头条
    val T1467284926140: List<News>? = null,  // 精选
    val T1348648517839: List<News>? = null,  // 娱乐
    val T1348649079062: List<News>? = null,  // 体育
    val T1348649580692: List<News>? = null,  // 科技
    val T1348648756099: List<News>? = null,  // 财经
    val T1348648141035: List<News>? = null   // 军事
)

data class NewsDetail(
    val docid: String,
    val title: String,
    val body: String,
    val source: String,
    val ptime: String,
    val img: List<String>? = null,
    val video: String? = null,
    val replyCount: Int = 0
)

data class VideoNews(
    val title: String,
    val url: String,
    val cover: String,
    val duration: Long,
    val playCount: Long,
    val ptime: String
)
